<!-- 上报任务页面 manage -->
<div class="container" :important="uploadTask">
    <style>
        textarea {
            min-height: 200px;
        }

    </style>

    <script>
        function updetail(value, row, index) {

            return "<button class='btn btn-warning upDetail'>任务阶段</button>"
        }


        function uPtaskDetails(value, row, index) {
            return "<button class='btn btn-warning UptaskInfo'>任务详情</button>"
        }


    </script>
    <!--  handler area -->
    <div class="row handler">

        <span><i style="font-size: 15px" class="iconfont">&#xe601;</i>功能模块</span>
        <hr>

        <div class="btnBlock" type="f">

            <div>
                <i class="iconfont">&#xe6e4;</i>
                <span style="vertical-align: super;">查询任务</span>
            </div>
        </div>

        <div class="btnBlock" type="s" :click="@upploadTaskModal">

            <div>
                <i class="iconfont">&#xe625;</i>
                <span style="vertical-align: super;">上报任务</span>
            </div>
        </div>

        <!-- 查询操作 -->
        <div class="btnarea">

        <form role="form" class="form-horizontal" data-parsley-validate="" novalidate="">

            <div class="form-group">

                <!--时间-->
                <div class="form-group">
                    <label class="col-sm-1 control-label">开始时间</label>
                    <div class="col-sm-2">
                        <div class="input-group date" data-provide="datepicker">
                            <input type="text" class="form-control" :duplex="@upload.startTime">
                            <div class="input-group-addon">
                                <span class="glyphicon glyphicon-th"></span>
                            </div>
                        </div>
                    </div>

                    <label class="col-sm-1 control-label">结束时间</label>
                    <div class="col-sm-2">
                        <div class="input-group date" data-provide="datepicker">
                            <input type="text" class="form-control" :duplex="@upload.endTime">
                            <div class="input-group-addon">
                                <span class="glyphicon glyphicon-th"></span>
                            </div>
                        </div>
                    </div>
                </div>

                <button type="button" class="btn btn-sm btn-warning col-sm-1 btn-right" :click="@uploadTaskSearch">查询</button>
            </div>

        </form>
        </div>


        <div></div>
        <span><i style="font-size: 15px" class="iconfont">&#xe6d6;</i>列表展示</span>
        <hr>
    </div>


    <div class="row data">
        <table id="uploadTable"
               data-pagination="true" data-id-field="id" data-page-list="[10, 25, 50, 100, ALL]"
               data-show-footer="false" data-side-pagination="client"
               data-page-number="1" data-page-size="5">
            <thead>
            <tr>
            <th data-field="state" data-radio="true"></th>
            <th data-field="taskName" data-sortable="true">任务名称</th>
            <th data-field="taskTypeName" data-sortable="true">任务类型名称</th>
            <!--<th data-field="totalDepName" data-sortable="true">科室名称</th>-->
            <th data-field="depTypeName" data-sortable="true">科室名称</th>
            <th data-field="branchName" data-sortable="true">支队名称</th>
            <th data-field="releaseTime" data-sortable="true">发布时间</th>
            <th data-field="startTime" data-sortable="true">开始时间</th>
            <th data-field="endTime" data-sortable="true">结束时间</th>
            <th data-field="taskWeight" data-width="2px" data-sortable="true">权重</th>
                <th data-field="operate" data-formatter="updetail" data-events="upDetailEv"></th>
                <th data-field="taskDetails" data-formatter="uPtaskDetails" data-events="showUpTaskDetail"></th>
            </tr>
            </thead>
        </table>
    </div>


<!-- 任务上报 modal -->
<div class="modal fade" id="upploadTaskModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h5 class="modal-title" id="exampleModalLabel"><i style="font-size: 15px;margin: 0 10px;" class="iconfont">&#xe64c;</i>任务上报</h5>
            </div>
            <div class="modal-body">
                <div>
                    <div class="row form-group">
                        <label for="message-text" class="col-sm-2 col-sm-offset-1">上报描述:</label>
                        <textarea class="col-sm-8" style="resize: none;height: 100px;min-height: 100px" id="message-text" :duplex="@upload.taskReportDES"></textarea>
                        <span class="col-sm-1 tip">*</span>
                    </div>

                    <div class="row form-group">
                        <label class="col-sm-2 col-sm-offset-1">选择阶段:</label>
                        <select class="col-sm-8" style="padding: 5px" id="selectTs" class="form-control">
                            <option disabled selected value="">--请选择--</option>
                            <option :for="el in @upload.jdList" :attr="{value : el.tsId}">{{el.tsName}}</option>
                            <span class="col-sm-1 tip">*</span>
                        </select>
                    </div>

                    <div class="row form-group">
                        <input class="col-sm-2 col-sm-offset-1" id="lefile" type="file" style="display:none" ms-on-change="@fileSe">
                        <div class="col-sm-2 col-sm-offset-1">
                            <button onclick="$('input[id=lefile]').click();" class="btn btn-danger">添加附件</button>
                            <p id="fileName"></p>
                            <p id="fileError" style="color: red"></p>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" :click="@uploadTask">确定</button>
            </div>
        </div>
    </div>
</div>


    <!-- 任务阶段详情 modal -->
    <div class="modal fade" id="upTaskJdDetail" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                    </button>
                    <h5 class="modal-title" id=""><i style="font-size: 15px;margin: 0 10px;" class="iconfont">&#xe64c;</i>任务阶段详情</h5>
                </div>
                <div class="modal-body" id="upDetailTaskProgress">
                </div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal" :click="@clear">关闭</button>
                </div>
            </div>
        </div>
    </div>


    <!-- 任务详细信息modal -->
    <div id="uptaskDetailModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" style="padding: 0 !important;">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body taskinfo">
                    <form id="sendTask" role="form" class="form-horizontal" data-parsley-validate="" novalidate="">
                        <div class="form-group">
                            <p class="col-sm-2">任务名称</p>
                            <div class="col-sm-10">
                                <p id="uptaskDetailName"></p>
                            </div>
                        </div>

                        <hr>

                        <div class="form-group">
                            <p class="col-sm-2">任务内容</p>
                            <div class="col-sm-10">
                                <p id="uptaskDetailContent"></p>
                            </div>
                        </div>

                        <hr>

                        <div class="form-group">
                            <p class="col-sm-2"></p>
                            <div class="col-sm-10">
                                <p class="btn btn-success">
                                    <a id="uptaskDetailFile" target="_blank" style="text-decoration: none;color: #fff">下载文件</a>
                                </p>
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>


</div>
